<template>
  <div class="box">
    <h1>two组件</h1>
    <v-three></v-three>
    <p>{{ user }}</p>
  </div>
</template>

<script>
import vThree from "./three.vue";
import { inject } from "vue";
export default {
  setup() {
    let user = inject("user"); //接收来自父组件的数据
    console.log(user);

    return {
      user
    }
  },
  components: {
    vThree,
  },
};
</script>

<style>
</style>